using System;
using System.Collections.Generic;
using System.Text;
using CuBlasNet;
using NUnit.Framework;

namespace CuBlas.Net.Tests
{
	[TestFixture]
	public class CuBlasNetLevel1Tests
	{
		const int ArraySize = 100;
		float[] _array = new float[ArraySize];

		[SetUp]
		public void Setup()
		{
			Random rnd = new Random();
			
			for (int i = 0; i < ArraySize; i++)
			{
				_array[i] = (float)rnd.NextDouble();
			}
		}

		[Test]
		public void IndexOfMaxTest()
		{
			Blas blas = new Blas();
			float max = Single.MinValue;
			int expected = -1;

			for (int i = 0; i < ArraySize; i++)
			{
				if (max < _array[i])
				{
					max = _array[i];
					expected = i;
				}
			}

			int actual = blas.IndexOfMax(_array, 0, 1);
			
			Assert.AreEqual(expected, actual);
		}

		public void IndexOfMinTest()
		{
		}

		public void AbsValueSumTest()
		{
		}

		public void AxpyTest()
		{
		}

		public void CopyTest()
		{
		}

		public void DotTest()
		{
		}

		public void Norm2Test()
		{
		}

		public void RotateTest()
		{
		}

		public void RotateGTest()
		{
		}

		public void RotateMTest()
		{
		}

		public void RotateMGTest()
		{
		}

		public void ScaleTest()
		{
		}

		public void SwapTest()
		{
		}
	}
}
